#{extends 'organization.html' /}
#{set title:'Adding new Item' /}

<h1 class="viewTitle">Add a new action item</h2> 
<div class="viewContent">
	<a href="#addItemForm">Dies ist ein riesenkrasser Test</a>
</div>
	<!-- FEEDBACK FORM START -->
	<div id="addItemWrapper">
			<form id="addItemForm" action="" method="post" name="addItemForm">
				<input type="hidden" id="planId" value="${planId}" />
				<div class="formEntry"> 
					<div class="formLabel"> 
						<label for="itemDescription">Description</label> 
					</div> 
					<textarea rows="5" cols="40" name="itemDescription" id="itemDescription" /></textarea>
					<div class="clear"></div> 
				</div>		
				<div class="formEntry"> 
					<div class="formLabel"> 
						<label for="stDate">Choose a start date</label> 
					</div> 
					<input class= "stDate" type="text" name="stDate" id="stDate"></input>
					<script type="text/javascript" charset="utf-8">$(".stDate").datepicker({dateFormat:'yy-mm-dd', showAnim:'fadeIn'})</script>			<div class="clear"></div> 
					<div class="clear"></div>
				</div>
				<div class="formEntry"> 
					<div class="formLabel"> 
						<label for="endDate">Choose an end date</label> 
					</div> 
					<input class = "endDate" type="text" name="endDate" id="endDate"></input>
					<script type="text/javascript" charset="utf-8"> $(".endDate").datepicker({dateFormat:'yy-mm-dd', showAnim:'fadeIn'})</script> 
					<div class="clear"></div>
				</div>

			  <div id="formButtons">
				<input type="submit" id="sendMessage" name="sendMessage" value="Send Feedback" />
				<input type="button" id="cancelAddItem" name="cancelAddItem" value="Cancel" />			  
			  </div>
			</form>

			<div id="sendingMessage" class="statusMessage"><p>Sending request, please wait...</p></div>
			<div id="successMessage" class="statusMessage"><p>Action item successfully added.</p></div>
			<div id="failureMessage" class="statusMessage"><p>The server encountered a problem, please try again later.</p></div>
			<div id="incompleteMessage" class="statusMessage"><p>Please fill in an item description.</p></div>		
	</div>
	<!-- ADD ITEM FORM END -->

<script type="text/javascript">
	// Init the form once the document is ready
	$( initAddItem );
</script>